package net.kehuilai.controller;

import net.kehuilai.SocketServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by genghz on 16/12/8.
 */
@RestController
public class ServerController {

    @Autowired
    private SocketServer server;

    @RequestMapping(value = "/send/{cid}", method = RequestMethod.GET)
    public void send(@PathVariable("cid") String cid) {
        server.send(cid, "clientMsg", "12345678");
    }
}
